<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>自动跳转页面</title>
<style>
    body {
        margin: 0;
        padding: 0;
        display: flex;
        justify-content: center; /* 水平居中 */
        align-items: center; /* 垂直居中 */
        height: 100vh; /* 使body占据整个视口高度 */
    }
    .container {
        text-align: center;
        display: flex;
        flex-direction: column; /* 子元素垂直排列 */
        gap: 10px; /* 子元素之间的间距 */
    }
    .box {
        padding: 20px;
        border: 1px solid #ccc;
        background-color: #f5f5f5;
        text-align: center;
    }
</style>
</head>
<body>

<div class="container">
<div class="box">提交成功</div>
<div class="box">1秒后系统会自动跳转,<a href="https://www.example.com" class="link" target="_blank">也可单击此链接跳转</a></div>


<script>
    // 设置定时器，1秒后跳转
    setTimeout(function() {
        window.location.href = 'https://www.example.com';
    }, 5000);

    // 为链接添加点击事件监听器
    document.querySelector('.link').addEventListener('click', function(event) {
        event.preventDefault(); // 阻止链接的默认行为
        window.location.href = this.href; // 手动设置跳转
    });
</script>

</body>
</html>